using System;
using System.Collections;

namespace Com.CMS263.PO
{
	#region Transaction

	/// <summary>
	/// Transaction object for NHibernate mapped table 'Transaction'.
	/// </summary>
	public class Transaction
	{
		#region Member Variables
		
		protected int _id;
		protected int _userId;
		protected string _userName;
		protected string _userEmail;
		protected decimal _balance;
		protected string _actionType;
		protected string _payType;
		protected DateTime _addDate;
		protected decimal _operAmount;

		#endregion

		#region Constructors

		public Transaction() { }

		public Transaction( int userId, string userName, string userEmail, decimal balance, string actionType, string payType, DateTime addDate, decimal operAmount )
		{
			this._userId = userId;
			this._userName = userName;
			this._userEmail = userEmail;
			this._balance = balance;
			this._actionType = actionType;
			this._payType = payType;
			this._addDate = addDate;
			this._operAmount = operAmount;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public  virtual int UserId
		{
			get { return _userId; }
			set { _userId = value; }
		}

		public  virtual string UserName
		{
			get { return _userName; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for UserName", value, value.ToString());
				_userName = value;
			}
		}

		public  virtual string UserEmail
		{
			get { return _userEmail; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for UserEmail", value, value.ToString());
				_userEmail = value;
			}
		}

		public  virtual decimal Balance
		{
			get { return _balance; }
			set { _balance = value; }
		}

		public  virtual string ActionType
		{
			get { return _actionType; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for ActionType", value, value.ToString());
				_actionType = value;
			}
		}

		public  virtual string PayType
		{
			get { return _payType; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for PayType", value, value.ToString());
				_payType = value;
			}
		}

		public  virtual DateTime AddDate
		{
			get { return _addDate; }
			set { _addDate = value; }
		}

		public  virtual decimal OperAmount
		{
			get { return _operAmount; }
			set { _operAmount = value; }
		}

		

		#endregion
	}
	#endregion
}